import { HashRouter} from 'react-router-dom';
import { Provider } from 'react-redux';
import store from './store'
import RouterView from './router';
import { persistStore } from 'redux-persist';
import { PersistGate } from 'redux-persist/integration/react';
// 分页组件英文转中文
import { ConfigProvider } from 'antd'
import zhCN from 'antd/es/locale/zh_CN'

// redux 持久化
const persistor = persistStore(store);

function App() {

  return (
    <div className="App">
      <HashRouter>
      <ConfigProvider locale={zhCN}>
        <Provider store={store}>
        <PersistGate persistor={persistor}>
      <RouterView />
      </PersistGate>
      </Provider>
      </ConfigProvider>
      </HashRouter>
    </div>
  );
}

export default App;
